FOLDER_NAME=$(date +%Y-%m-%d-%H:%M:%S)
mkdir $FOLDER_NAME

VM_PATH=/data/local/tmp

index=1
for CASE_PATH in $*
do
    for testcase in `cat case.list`
    do
        echo "running $testcase in $CASE_PATH......"
        echo "running $testcase in $CASE_PATH......" >> $FOLDER_NAME/$index.log
        for i in $(seq 1 5)
        do
	    LD_LIBRARY_PATH=$VM_PATH ./ark_js_vm --entry-point=$testcase --aot-file=$CASE_PATH/$testcase $CASE_PATH/$testcase.abc >> $FOLDER_NAME/$index.log 2>&1
        done
    done
    let index+=1
done
